package bo;

import java.rmi.RemoteException;

public class InterventionEnCours extends InterventionEtat {

        private final String libelle = "EN";
        
        @Override
        public synchronized boolean setInterventionEtat(Intervention intervention) throws RemoteException {
            if (intervention == null) {
                return false;
            }
            if (!ListeInterventions.getInstance().contientIntervention(intervention)) {
                return false;
            }
            //Seule une intervention Planifiee peut Ãªtre EnCours
            if (intervention.getStatut().getlibelle().contentEquals("PL")) {
                return false;
            }
            return true;
        }
    
        public synchronized String getlibelle(){
                return this.libelle;
        }
}